Paste #147012 |
pasted on 04.10.2020 09:23
- Edit to this paste
- Raw
- The following pastes replied to this paste: # 158845 # 239202
- Show paste tree
-
Compare with paste
#
Text paste
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | // 20201004 утечка памяти
#include <stdio.h>
void f(int vrem);
int main(void)
{
int pause = 0;
int i = 0;
for (i = 0; i <= 10000; i++)
f(i);
printf ("\n");
scanf("%d", pause);
return (0);
}
void f(int vrem)
{
int i = malloc(sizeof(int));
i = vrem;
printf ("%d", i);
return i;
}
|
